/*
import java.util.List;
//站点查询功能，增删改查
 class AbstractRoute implements Route {
    //抽象类 AbstractRoute 实现接口 Route
    protected String name;
    //泛型
    protected List<String> stations;

    public AbstractRoute(String name, List<String> stations) {
        this.name = name;
        this.stations = stations;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<String> getStations() {
        return stations;
    }

    public void setStations(List<String> stations) {
        this.stations = stations;
    }

    public double getDistance() {
        // 计算距离的逻辑
        return 0;
    }

    @Override
    public double getFare() {
        // 计算费用的逻辑
        return 0;
    }

    //向集合中添加数据信息
    @Override
    public void addStation(String station) {
        System.out.println("要增加的站点信息为:" + station);
        stations.add(station);
    }

    //删除集合中的数据信息
    @Override
    public void removeStation(String station) {
        System.out.println("要删除的站点信息为:" + station);
        stations.remove(station);
    }

    //更改结合中的数据信息
    @Override
    public void updateStation(String oldStation, String newStation) {
        System.out.println("要更改的站点信息为:" + oldStation + "->" + newStation);
        int index = stations.indexOf(oldStation);
        if (index != -1) {
            stations.set(index, newStation);
        }
    }

    //查看集合中的数据信息
    @Override
    public void queryStations(String s) {

    }



}

*/
